package com.volcreate.guoqing.no3;

import java.util.Scanner;

/**
 * @author zxc
 * @date 2020/9/24
 */

public class Main {
    public static void main(String args[]) {
        String str;
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            str = scanner.nextLine();

            System.out.printf("choice=%s\n", str);
            if (str.equals("double")) {
                double[] d = new double[3];
                for (int i = 0; i < 3; i++) {
                    d[i] = scanner.nextDouble();
                }
                System.out.printf("%-5.2f,%5.2f,%.2f\n", d[0], d[1], d[2]);
                scanner.nextLine();
            } else if (str.equals("int")) {
                int sum = 0;
                for (int i = 0; i < 3; i++) {
                    sum += scanner.nextInt();
                }
                System.out.printf("%d\n", sum);
                scanner.nextLine();
            } else if (str.equals("str")) {
                String s = scanner.nextLine();
                String[] split = s.split("\\s+");
                for (int i = split.length - 1; i >= 0; i--) {
                    System.out.print(split[i]);
                }
                System.out.println();
            } else if (str.equals("line")) {
                String s = scanner.nextLine();
                String s1 = s.toUpperCase();
                System.out.println(s1);
            } else {
                System.out.println("other");
            }
        }
    }
}


